feat: support custom container images via config#325
Open
gtsiolis wants to merge 1 commit into
Open
Conversation
bda6687 to
c110e5c
Compare
19ff009 to
49bf731
Compare
Collaborator
|
I would ship these 2 features in 2 PRs to keep them small and easy to review:
For the latter, we are missing the most important integration tests that make sure the CLI works properly when offline. |
Member
Author
|
Agree, will break in two PRs later. :loading: |
9d11ab8 to
8e798eb
Compare
37dd169 to
fd896c8
Compare
Member
Author
|
Could you take another look, @carole-lavillonniere? 🍸 |
fd896c8 to
696f298
Compare
Collaborator
|
I think it would be important to write an integration test for the success path:
|
Each [[containers]] block may set an optional `image` to override the default Docker Hub image, e.g. an internal registry mirror or a locally loaded offline image. ContainerConfig.Image() returns `image` as-is when it already carries a tag, otherwise it appends `tag` (or "latest"); the default localstack/<product>:<tag> is used when `image` is unset. Refs DEVX-703 Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
696f298 to
d059449
Compare
gtsiolis
added a commit
that referenced
this pull request
Jun 26, 2026
… path The two offline start tests started a real container under an isolated t.TempDir() HOME, so the container's root-owned volume files (e.g. server.test.pem.key) could not be removed by t.TempDir cleanup, failing in CI. Use the real (inherited) HOME like every other fresh-start container test; config stays isolated via --config. Adds TestStartSkipsPullAndLicenseCheckWhenImageIsLocal covering the #325 review's success path: a pinned configured image found locally starts with no pull and no CLI license check (asserted via a license server that fails the test if contacted).
Member
Author
|
@carole-lavillonniere, thoughts? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an optional per-container
imagefield so users can override the default Docker Hub image — e.g. point at an internal registry mirror or a locally loaded offline image.ContainerConfig.Image():imageas-is when it already carries a tag,tag(orlatest),localstack/<product>:<tag>whenimageis unset.Scope
Split out of the original DEVX-703 work to keep reviews small. This PR is image override only. Rebased on
main(which now includes #339).The offline / slow-network handling that originally motivated this branch is stacked on top of this PR in #337 (graceful degradation when the registry or license server is unreachable). The success-path integration test raised in review — a configured image found locally ⇒ no pull and no CLI license check ⇒ container starts — lives on #337, since it depends on the start-path logic this PR doesn't touch.
Related follow-ups (tracked under PRO-219):
pull_policyconfig +--pullflagTests
internal/configImage()resolution cases (with/without tag, registry port, digest, default).TestStartWithCustomImageFailsClearlyWhenUnavailable— a configured custom image is honored and fails clearly when it can be neither pulled nor found locally.Known limitations
FindRunningByImage) still matches only the defaultlocalstack/*repos, so a container started from a customimageis invisible to the image-based scans used for port-conflict / cross-type detection and stop/status reuse. The common re-run path is unaffected (it matches by container name). Extending discovery to custom images is tracked as follow-up.Refs DEVX-703